import Http from "../Http";
import qs from "qs";

// 用户登录相关
export default {
    // 学生登录
    login(phone, password) {
        return Http.post("/tms/user/login", qs.stringify({
            phone, password
        }))
    },
    // 教师登录
    teacherLogin(phone, password) {
        return Http.post("/tms/teacher/login", qs.stringify({
            phone, password
        }))
    },
    // 管理员登录
    adminLogin(username, password) {
        return Http.post("/admin/login", qs.stringify({
            username, password
        }))
    },
    logout() {
        return Http.post("/user/logout")
    },

}
